package wdt_qf.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import wdt_qf.entity.wdt.WdtHttpResult;
import wdt_qf.entity.wdt.WdtOtherOutStockQueryInfo;
import wdt_qf.entity.wdt.WdtPdBillQueryInfo;
import wdt_qf.entity.wdt.WdtSaleQueryInfo;
import wdt_qf.service.WdtService;

import javax.annotation.Resource;

@RestController
@RequestMapping("getWdtBill")
@Api(tags = "单据")
@Slf4j
public class GetWdtBillController {
    @Resource
    private WdtService wdtService;

    @PostMapping("/getWdtSaleBill")
    @ApiOperation(value = "获取旺店通销售单", response = WdtHttpResult.class)
    public WdtHttpResult getWdtSaleBill(@RequestBody WdtSaleQueryInfo queryInfo) {
        return wdtService.getWdtSaleBill(queryInfo);
    }


    @PostMapping("/getWdtSaleBill2")
    @ApiOperation(value = "获取旺店通销售单2", response = WdtHttpResult.class)
    public WdtHttpResult getWdtSaleBill2(@RequestBody WdtSaleQueryInfo queryInfo) {
        return wdtService.getWdtSaleBill2(queryInfo);
    }

    @PostMapping("/getWdtSaleBackBill")
    @ApiOperation(value = "获取旺店通销售退货单", response = WdtHttpResult.class)
    public WdtHttpResult getWdtSaleBackBill(@RequestBody WdtSaleQueryInfo queryInfo) {
        return wdtService.getWdtSaleBackBill(queryInfo);
    }

    @PostMapping("/getWdtOtherOutStockBill")
    @ApiOperation(value = "获取旺店通其他出库单", response = WdtHttpResult.class)
    public WdtHttpResult getWdtOtherOutStockBill(@RequestBody WdtOtherOutStockQueryInfo queryInfo) {
        return wdtService.getWdtOtherOutStockBill(queryInfo);
    }

    @PostMapping("/getWdtPDBill")
    @ApiOperation(value = "获取旺店通盘点单", response = WdtHttpResult.class)
    public WdtHttpResult getWdtPDBill(@RequestBody WdtPdBillQueryInfo queryInfo) {
        return wdtService.getWdtPDBill(queryInfo);
    }
}
